e42c0d5294f8246169f347eae84b3df70ced46ff,xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test-pageobjects/src/main/java/org/xwiki/appwithinminutes/test/po/ApplicationClassEditPage.java,ApplicationClassEditPage,addField,#String#,136
Before Change
{
String fieldXPath = "//span[@class = 'field' and normalize-space(.) = '%s']";
WebElement field = palette.findElement(By.xpath(String.format(fieldXPath, fieldType)));
int fieldCount = getUtil().findElementsWithoutWaiting(getDriver(), fields, By.xpath("li")).size();
// NOTE: We scroll the page up because the drag&drop fails sometimes if the dragged field and the canvas (drop
// target) are not fully visible. See https://code.google.com/p/selenium/issues/detail?id=3075 .
palette.sendKeys(Keys.HOME);
After Change
// target) are not fully visible. See https://code.google.com/p/selenium/issues/detail?id=3075 .
palette.sendKeys(Keys.HOME);
new Actions(getDriver()).dragAndDrop(field, fieldsCanvas).perform();
final WebElement addedField = fieldsCanvas.findElement(By.xpath("./ul[@id='fields']/li[last()]"));
getUtil().waitUntilCondition(new ExpectedCondition<Boolean>()
{